import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import router from './router'
import ElementUI, { Tree } from 'element-ui'
import store from './store'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/css/main.css'
import * as echarts from 'echarts'
import TreeTable from 'vue-table-with-tree-grid'
import vueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VueRouter)
Vue.use(vueQuillEditor )
Vue.component('tree-table',TreeTable)
Vue.filter('dateFormat',function(originval){
    const dt = new Date(originval)
    const y = dt.getFullYear()
    const m = (dt.getMonth()+1+'').padStart(2,'0')
    const d = (dt.getDate()+'').padStart(2,'0')

    const h = (dt.getHours()+'').padStart(2,'0')
    const mm = (dt.getMinutes()+'').padStart(2,'0')
    const ss = (dt.getSeconds()+'').padStart(2,'0')
    return `${y}-${m}-${d} ${h}:${mm}:${ss}`
})
new Vue({
  store,
  router,
  render: h => h(App),
}).$mount('#app')
